﻿<UserControl x:Class="EpiDashboard.StatCalc.Cohort"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d" 
             Height="350" Width="525">
    <Grid>
        <GroupBox Margin="0,0,5,0">
            <GroupBox.Header>
                <TextBlock FontWeight="Bold">StatCalc - Sample Size and Power</TextBlock>
            </GroupBox.Header>
            <StackPanel x:Name="pnlMainContent" Background="White">
                <StackPanel.ContextMenu>
                    <ContextMenu>
                        <MenuItem x:Name="mnuSave" Header="Save As Image..."/>
                        <MenuItem x:Name="mnuPrint" Header="Print..."/>
                    </ContextMenu>
                </StackPanel.ContextMenu>
                <TextBlock Padding="15" FontWeight="Bold" TextWrapping="Wrap" HorizontalAlignment="Center">Unmatched Cohort and Cross-Sectional Studies (Exposed and Nonexposed)</TextBlock>
                <Grid Height="280">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width=".5*" />
                        <ColumnDefinition Width=".5*" />
                    </Grid.ColumnDefinitions>
                    <Grid Grid.Column="0">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width=".65*"/>
                            <ColumnDefinition Width=".35*"/>
                        </Grid.ColumnDefinitions>
                        <Grid.RowDefinitions>
                            <RowDefinition Height="40"/>
                            <RowDefinition Height="40"/>
                            <RowDefinition Height="40"/>
                            <RowDefinition Height="40"/>
                            <RowDefinition Height="40"/>
                            <RowDefinition Height="40"/>
                            <RowDefinition Height="40"/>
                        </Grid.RowDefinitions>
                        <TextBlock VerticalAlignment="Center" Grid.Row="0" Grid.Column="0" TextWrapping="Wrap">Two-sided confidence level:</TextBlock>
                        <ComboBox Grid.Row="0" Grid.Column="1" HorizontalAlignment="Center"  VerticalAlignment="Center" FontFamily="Microsoft Sans Serif"  x:Name="cbxConfidenceLevel">
                            <ComboBoxItem>80%</ComboBoxItem>
                            <ComboBoxItem>90%</ComboBoxItem>
                            <ComboBoxItem>95%</ComboBoxItem>
                            <ComboBoxItem>99%</ComboBoxItem>
                            <ComboBoxItem IsSelected="True">99.9%</ComboBoxItem>
                            <ComboBoxItem>99.99%</ComboBoxItem>
                        </ComboBox>
                        <TextBlock VerticalAlignment="Center" Grid.Row="1" Grid.Column="0" TextWrapping="Wrap">Power:</TextBlock>
                        <StackPanel Grid.Row="1" Grid.Column="1" HorizontalAlignment="Left"  Orientation="Horizontal">
                            <TextBox TextAlignment="Right" Height="30" Width="74" HorizontalAlignment="Left"  FontFamily="Arial Unicode MS" FontSize="20" x:Name="txtPower"></TextBox>
                            <TextBlock VerticalAlignment="Center" FontWeight="Black">&#160;%</TextBlock>
                        </StackPanel>
                        <TextBlock VerticalAlignment="Center" Grid.Row="2" Grid.Column="0" TextWrapping="Wrap">Ratio (Unexposed : Exposed):</TextBlock>
                        <TextBox Grid.Row="2" Grid.Column="1" TextAlignment="Right" Height="30" Width="74" HorizontalAlignment="Left"  FontFamily="Arial Unicode MS" FontSize="20" x:Name="txtRatioControlsExposed"></TextBox>
                        <TextBlock VerticalAlignment="Center" Grid.Row="3" Grid.Column="0" TextWrapping="Wrap">% outcome in unexposed group:</TextBlock>
                        <StackPanel Grid.Row="3" Grid.Column="1" HorizontalAlignment="Left"  Orientation="Horizontal">
                            <TextBox TextAlignment="Right" Height="30" Width="74" HorizontalAlignment="Left"  FontFamily="Arial Unicode MS"  FontSize="20" x:Name="txtPctControlsExposed"></TextBox>
                            <TextBlock VerticalAlignment="Center" FontWeight="Black">&#160;%</TextBlock>
                        </StackPanel>
                        <TextBlock VerticalAlignment="Center" Grid.Row="4" Grid.Column="0" TextWrapping="Wrap">Risk ratio:</TextBlock>
                        <TextBox Grid.Row="4" Grid.Column="1" TextAlignment="Right" Height="30" Width="74" HorizontalAlignment="Left"  FontFamily="Arial Unicode MS" FontSize="20" x:Name="txtRiskRatio"></TextBox>

                        <TextBlock VerticalAlignment="Center" Grid.Row="5" Grid.Column="0" TextWrapping="Wrap">Odds ratio:</TextBlock>
                        <TextBox Grid.Row="5" Grid.Column="1" TextAlignment="Right" Height="30" Width="74" HorizontalAlignment="Left"  FontFamily="Arial Unicode MS" FontSize="20" x:Name="txtOddsRatio"></TextBox>

                        <TextBlock VerticalAlignment="Center" Grid.Row="6" Grid.Column="0" TextWrapping="Wrap">% outcome in exposed group:</TextBlock>
                        <StackPanel Grid.Row="6" Grid.Column="1" HorizontalAlignment="Left"  Orientation="Horizontal">
                            <TextBox TextAlignment="Right" Height="30" Width="74" HorizontalAlignment="Left"  FontFamily="Arial Unicode MS"  FontSize="20" x:Name="txtPctCasesWithExposure"></TextBox>
                            <TextBlock VerticalAlignment="Center" FontWeight="Black">&#160;%</TextBlock>
                        </StackPanel>
                    </Grid>
                    <Grid Grid.Column="1" HorizontalAlignment="Center" VerticalAlignment="Center">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="70" />
                            <ColumnDefinition Width="60" />
                            <ColumnDefinition Width="60" />
                            <ColumnDefinition Width="60" />
                        </Grid.ColumnDefinitions>
                        <Grid.RowDefinitions>
                            <RowDefinition Height="30"/>
                            <RowDefinition Height="30"/>
                            <RowDefinition Height="30"/>
                            <RowDefinition Height="30"/>
                        </Grid.RowDefinitions>
                        <Rectangle Grid.Column="0" Grid.Row="1" Stroke="Black" Fill="{x:Static SystemColors.MenuHighlightBrush}"/>
                        <TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" Grid.Column="0" Grid.Row="1" FontWeight="Bold" Foreground="White">Exposed</TextBlock>
                        <Rectangle Grid.Column="0" Grid.Row="2" Stroke="Black" Fill="{x:Static SystemColors.MenuHighlightBrush}"/>
                        <TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" Grid.Column="0" Grid.Row="2" FontWeight="Bold" Foreground="White">Unexposed</TextBlock>
                        <Rectangle Grid.Column="0" Grid.Row="3" Stroke="Black" Fill="{x:Static SystemColors.MenuHighlightBrush}"/>
                        <TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" Grid.Column="0" Grid.Row="3" FontWeight="Bold" Foreground="White">Total</TextBlock>

                        <Rectangle Grid.Column="1" Grid.Row="0" Stroke="Black" Fill="{x:Static SystemColors.MenuHighlightBrush}"/>
                        <TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" Grid.Column="1" Grid.Row="0" FontWeight="Bold" Foreground="White">Kelsey</TextBlock>
                        <Rectangle Grid.Column="2" Grid.Row="0" Stroke="Black" Fill="{x:Static SystemColors.MenuHighlightBrush}"/>
                        <TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" Grid.Column="2" Grid.Row="0" FontWeight="Bold" Foreground="White">Fleiss</TextBlock>
                        <Rectangle Grid.Column="3" Grid.Row="0" Stroke="Black" Fill="{x:Static SystemColors.MenuHighlightBrush}"/>
                        <TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" Grid.Column="3" Grid.Row="0" FontWeight="Bold" Foreground="White">Fleiss<LineBreak/>w/ CC</TextBlock>

                        <Rectangle Grid.Column="1" Grid.Row="1" Stroke="Black"/>
                        <TextBlock Name="txtKelseyCases" HorizontalAlignment="Center" VerticalAlignment="Center" Grid.Column="1" Grid.Row="1">0</TextBlock>
                        <Rectangle Grid.Column="1" Grid.Row="2" Stroke="Black"/>
                        <TextBlock Name="txtKelseyControls" HorizontalAlignment="Center" VerticalAlignment="Center" Grid.Column="1" Grid.Row="2">0</TextBlock>
                        <Rectangle Grid.Column="1" Grid.Row="3" Stroke="Black"/>
                        <TextBlock Name="txtKelseyTotal" HorizontalAlignment="Center" VerticalAlignment="Center" Grid.Column="1" Grid.Row="3">0</TextBlock>
                        <Rectangle Grid.Column="2" Grid.Row="1" Stroke="Black"/>
                        <TextBlock Name="txtFleissCases" HorizontalAlignment="Center" VerticalAlignment="Center" Grid.Column="2" Grid.Row="1">0</TextBlock>
                        <Rectangle Grid.Column="2" Grid.Row="2" Stroke="Black"/>
                        <TextBlock Name="txtFleissControls" HorizontalAlignment="Center" VerticalAlignment="Center" Grid.Column="2" Grid.Row="2">0</TextBlock>
                        <Rectangle Grid.Column="2" Grid.Row="3" Stroke="Black"/>
                        <TextBlock Name="txtFleissTotal" HorizontalAlignment="Center" VerticalAlignment="Center" Grid.Column="2" Grid.Row="3">0</TextBlock>
                        <Rectangle Grid.Column="3" Grid.Row="1" Stroke="Black"/>
                        <TextBlock Name="txtFleissCCCases" HorizontalAlignment="Center" VerticalAlignment="Center" Grid.Column="3" Grid.Row="1">0</TextBlock>
                        <Rectangle Grid.Column="3" Grid.Row="2" Stroke="Black"/>
                        <TextBlock Name="txtFleissCCControls" HorizontalAlignment="Center" VerticalAlignment="Center" Grid.Column="3" Grid.Row="2">0</TextBlock>
                        <Rectangle Grid.Column="3" Grid.Row="3" Stroke="Black"/>
                        <TextBlock Name="txtFleissCCTotal" HorizontalAlignment="Center" VerticalAlignment="Center" Grid.Column="3" Grid.Row="3">0</TextBlock>
                    </Grid>
                </Grid>
            </StackPanel>
        </GroupBox>
        <Image x:Name="imgClose" Source="..\Images\x.png" HorizontalAlignment="Right" VerticalAlignment="Top" Stretch="None" />
    </Grid>
</UserControl>
